package de.velvettear.squirrel.gui.widget;

import android.appwidget.AppWidgetManager;
import android.appwidget.AppWidgetProvider;
import android.content.ComponentName;
import android.content.Context;
import android.widget.RemoteViews;

public class ClockWidget extends AppWidgetProvider {

	private static RemoteViews remoteViews;
	
	@Override
	public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {
		
		ComponentName clockWidget = new ComponentName(context, ClockWidget.class);
		int[] widgetIDs = appWidgetManager.getAppWidgetIds(clockWidget);
		for (int id : widgetIDs) {
//			remoteViews = new RemoteViews(context.getPackageName(), R.layout.widget_clock);
//			
//			
//			remoteViews.setProgressBar(R.id.widget_clock_pb, 60, 0, false);
			
			appWidgetManager.updateAppWidget(id, remoteViews);
		}
	
		super.onUpdate(context, appWidgetManager, appWidgetIds);
	}
	
}
